#include <iostream>
#include <algorithm>
using namespace std;
const int N = 100010;
int n;
int a[N];

int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }

int main()
{
    cin >> n;

    for (int i = 0; i < n; ++i)
        cin >> a[i];
    sort(a, a + n);
    int d = 0;
    for (int i = 1; i < n; ++i)
    {
        int tmp = a[i] - a[i - 1];
        d = gcd(d, tmp);
        // cout << d << ' ';
    }
    // cout << endl;
    // cout << d << endl;
    if (d == 0)
        cout << n << endl;
    else
        cout << (a[n - 1] - a[0]) / d + 1 << endl;
    return 0;
}